/*#include "control_config.hpp"

using namespace Shiny;
using namespace Shiny::Widgets;

ConfiguredControl::ConfiguredControl(const Data data)
{
    const std::string& typeName = data.Key();

    if      (typeName == "joystick")
    {
	type     = Joystick;
	joystick = data["id"];
	button   = data["button"];
    }
    else if (typeName == "keyboard")
    {
	type     = Keyboard;
	key      = string2key(data["key"].Value());
    }
}

std::vector<ConfiguredControl> ControlEditor::GetControls(void)
{
    std::list<ConfiguredControl>    controls;
    std::vector<ConfiguredControl>  ret;
    {
	Container::Children::iterator   it  = _children.begin();
	Container::Children::iterator   end = _children.end();

	for (; it != end ; ++it)
	{
	    ControlEditorItem* item  = reinterpret_cast<ControlEditorItem*>(*it);
	    sf::Event          event = item->GetControl();
	    ConfiguredControl  control;

	    if (event.Type == sf::Event::KeyPressed || event.Type == sf::Event::KeyReleased)
	      control = ConfiguredControl(event.Key.Code);
	    else if (event.Type == sf::Event::JoystickButtonPressed || event.Type == sf::Event::JoystickButtonReleased)
	      control = ConfiguredControl(event.JoystickButton.JoystickId, event.JoystickButton.Button);
	    controls.push_front(control);
	}
    }

    {
	std::list<ConfiguredControl>::iterator it  = controls.begin();
	std::list<ConfiguredControl>::iterator end = controls.end();

	for (; it != end ; ++it)
	    ret.push_back(*it);
    }
    return (ret);
}
*/
